<?php

namespace Dcat\Admin\Caijiwebinfo\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class CaijiwebinfoCms extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'caijiwebinfo_cms';
    
    protected $guarded = [];

    const Platform_arr = ['wxgzh' => '微信公众号', 'taobao' => '淘宝天猫', 'jd' => '京东', '1688' => '1688'];

    public static function addlogs($data){
        $info = CaijiwebinfoCms::firstOrCreate(['web_url'=>$data['web_url']],$data);
        return $info;
    }
}
